package com.prelearning.at_springboot.constant;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//企业微信静态api
//@RestController
//@RequestMapping("/")
public class WorkWXAPI {

//    @GetMapping("WW_verify_8XhDeLhcXlJaXfcv.txt")
//    public String wxPrivateKey(){
//        return "8XhDeLhcXlJaXfcv";
//    }

    public static final String CORPID ="ww399ad41b83ce63d1" ;
    public static final String SECRET = "kpTZeoJgn1sIeAgMMBkIX3hWSwHjzY4qWd5XO6OVOnk";
    public static final String ADDRESS_SECRET = "VFHszai392BGHrqLhGPA5NdHYaSeqiuFFL8pQTmWevI";
    public static String GET_ACCESS_TOKEN_URL =String.format("https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=%s&corpsecret=%s",CORPID,SECRET);
    public static String getGetAccessTokenUrl() {
        return GET_ACCESS_TOKEN_URL;
    }

    //创建群聊会话-post
    public static String CREAT_CHAT = "https://qyapi.weixin.qq.com/cgi-bin/appchat/create?access_token=%s";

    //修改群聊会话-post
    public static String EDITE_CHAT = "https://qyapi.weixin.qq.com/cgi-bin/appchat/update?access_token=%s";

    //获取群聊会话-get
    public static String GET_CHAT = "https://qyapi.weixin.qq.com/cgi-bin/appchat/get?access_token=%s&chatid=%s";

    //应用推送消息-post
    public static String MESSAGE_CHAT = "https://qyapi.weixin.qq.com/cgi-bin/appchat/send?access_token=%s";

    //获取部门成员详情-get
    public static String GET_DEPARTMENT_LIST = "https://qyapi.weixin.qq.com/cgi-bin/user/list?access_token=%s&department_id=%s&fetch_child=0";

    //获取用户详情
    public static String GET_USER_DETAIL = "https://qyapi.weixin.qq.com/cgi-bin/user/get?access_token=%s&userid=%s";


    //
    public static String A = "";

}
